<?php

namespace app\admin\model;

use think\Model;

class Zhuanye extends Model
{
    // 表名
    protected $name = 'zhuanye';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    
    // 追加属性
    protected $append = [

    ];
    
    public function getYearList()
    {
    	$year = db('config')->where('name','year')->find();   
    	$tmp= explode("{", $year['value']);
    	$tmp1=explode("}",$tmp[1]);
    	$tmp2=explode(",",$tmp1[0]);
    	foreach ($tmp2 as $key => $value) {
    		$tmp3[]=explode(":",$value,2);
    	}
    	foreach ($tmp3 as $k => $v){
    		$tmp4[$k][]=str_replace('"', '', $v[0]);
    		$tmp4[$k][]=str_replace('"', '', $v[1]);
    	}
    	return $tmp4;    	   	
    }
    







}
